package com.sjq.common.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.sjq.common.entity.MenuTree;
import com.sjq.common.exception.DataAccessException;

public interface MenuTreeDao {
	
	public MenuTree selectSingleJsTree(String pid) throws DataAccessException;
	
	public List<Map<String, Object>> selectJsTreeChildren()throws DataAccessException;
	
	public List<Map<String, Object>> selectAllJsTree()throws DataAccessException;
	
	public List<Map<String, Object>> selectTreeByPid(String pid)throws DataAccessException;
	
	public MenuTree selectSingleMenu(String menuId)throws DataAccessException;
	
	public void insertMenu(MenuTree menu)throws DataAccessException;
	
	public void updateMenu(MenuTree menu)throws DataAccessException;

	//删除已授权菜单
	public void deletePrivilege(String menuId)throws DataAccessException;
	//删除菜单资源
	public void deletePermission(String menuId)throws DataAccessException;
	//删除菜单
	public void deleteMenu(String menuId)throws DataAccessException;
	//根据pid查询菜单
	public List<Map<String, Object>> selectMenuNameByPid(String pid)throws DataAccessException;
	/**删除权限组中的权限**/
	public int deleteAuthoriedMenu(String authorityId);
	/**插入权限组的权限**/
	public int insertAuthoriedMenu(String menuId,String authorityId);
	/**查看授权的标签集合**/
	public List<Map<String, String>> findAuthoriedMenu(String authorityId) throws SQLException;
}
